package com.enjoyor.soa.traffic.core.tpcms.mapper.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.enjoyor.soa.traffic.core.tpcms.constant.InfoZoneSqlId;
import com.enjoyor.soa.traffic.core.tpcms.domain.InfoZone;
import com.enjoyor.soa.traffic.core.tpcms.mapper.IInfoZoneMapper;
import com.enjoyor.soa.traffic.frame.support.mybatis.mapper.impl.BaseMapper;

@Service
@Transactional
public class InfoZoneMapper extends BaseMapper<InfoZone> implements IInfoZoneMapper {

    @SuppressWarnings("rawtypes")
    @Override
    public List<InfoZone> selectListInfo(Map map) {
        return sqlSessionTemplate.selectList(getSqlName(InfoZoneSqlId.SQL_SELECT_LIST), map);
    }

    /**
     * 绘制区域位置信息
     */
    @Override
    public void drawingZoneShape(InfoZone infoZone) {
        sqlSessionTemplate.update(getSqlName(InfoZoneSqlId.SQL_UPDATE_ZONE_SHAPE), infoZone);
    }

}
